@extends("layouts.main")

@section("title")
	Upload CSV using Uploadify
@stop

@section("styles")
	<!--<link rel="stylesheet" type="text/css" href="js/uploadify/uploadify.css" />-->
	{{ HTML::style('js/uploadify/uploadify.css') }}
@stop

@section("scripts")
	<!--<script src="js/uploadify/jquery.uploadify.js"></script>-->
	{{ HTML::script('js/uploadify/jquery.uploadify.js') }}

	<?php //echo app_path(); ?>

	<script>
		$(document).ready(function() {
			var publicPath = $("#publicPath").val();
			console.log(publicPath + "js/uploadify/uploadify.swf");

		    $("#fileUpload").uploadify({
		        "swf"      : "../js/uploadify/uploadify.swf",
		        "uploader" : "../uploadify/upload",
		        //"cancelImg": publicPath + "js/uploadify/uploadify-cancel.jpg",
		        "fileExt": "*.csv",
		        "multi": false,
		        "sizeLimit": "20MB",
		        "removeCompleted": false,
		        "uploadLimit": 100,
		        "checkExisting": "../uploadify",
		        //"debug": true,
		        "onSelect": function() {

		        },
		        "onComplete": function() {

		        },
		        "onError": function() {

		        }
		        
		    });
		});
	</script>
@stop

@section("content")
	<input type="hidden" id="publicPath" value="{{ URL::asset('') }}"/>
	<input type="file" name="fileUpload" id="fileUpload" />
@stop